Skip to content

Replace os.system with subprocess.run - #165

Open
nikosavola wants to merge 1 commit into
Isotr0py:mainfrom
nikosavola:nikosavola/push-xmkwunozyxou
Open

Replace os.system with subprocess.run#165
nikosavola wants to merge 1 commit into
Isotr0py:mainfrom
nikosavola:nikosavola/push-xmkwunozyxou

Conversation

@nikosavola

Copy link
Copy Markdown

test_debug_mode used os.system(), whose exit code is a platform-dependent packed wait status, not a plain return code, and shelled out to whatever 'python' resolves to on PATH rather than the interpreter actually running pytest. Replace with subprocess.run using an argument list and sys.executable, capturing output so a CI failure shows the traceback instead of just a bare assert.

`test_debug_mode` used `os.system()`, whose exit code is a platform-dependent packed wait status, not a plain return code, and shelled out to whatever 'python' resolves to on PATH rather than the interpreter actually running pytest. Replace with `subprocess.run` using an argument list and `sys.executable`, capturing output so a CI failure shows the traceback instead of just a bare assert.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant